package com.chj233.blueView.blue;

import android.os.Bundle;
import android.view.View;

import androidx.appcompat.app.AppCompatActivity;

import com.alibaba.android.arouter.facade.annotation.Route;
import com.alibaba.android.arouter.launcher.ARouter;
import com.chj233.libapp.Constance;
import com.chj233.blueView.R;

@Route(path = Constance.BLUE_VIEW)
public class BlueActivity extends AppCompatActivity implements View.OnClickListener {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_blue);
        ARouter.getInstance().inject(this);
        findViewById(R.id.mains).setOnClickListener(this);
        findViewById(R.id.view1).setOnClickListener(this);
    }

    @Override
    public void onClick(View view) {
        int id = view.getId();
        if (id == R.id.mains) {
            ARouter.getInstance().build(Constance.MAIN_VIEW).navigation();
        } else if (id == R.id.view1) {
            ARouter.getInstance().build(Constance.GREEN_VIEW).navigation();
        }
    }
}